<script>
	var getProductInformationUrl = '<?php echo $this->getProductInformationUrl(); ?>';
	var getNewBarcodeUrl = '<?php echo $this->getNewBarcodeUrl(); ?>';
</script>

<table border="0" width="100%">
<tr>
	<td>
		<?php if (($this->getProduct()->getsmall_image() != null) && ($this->getProduct()->getsmall_image() != 'no_selection')): ?>
			<img src="<?php echo mage::helper('catalog/image')->init($this->getProduct(), 'small_image')->resize(50); ?>" width="50" height="50">	
		<?php endif; ?>
	</td>
	<td>
		<h3><?php echo $this->getProduct()->getName(); ?></h3>
		<p><i><?php echo $this->getProduct()->getSku(); ?></i></p>
	</td>
</tr>
<?php foreach ($this->getStocks() as $stock): ?>
	<tr>
		<td colspan="2">
			<table border="1" cellspacing="0" cellpadding="5" width="100%">
				<tr>
					<th class="a-center" bgcolor="#cccccc" colspan="3"><?php echo $stock->getstock_name(); ;?></th>
				</tr>
				<tr>
					<td><b><?php echo $this->__('Stock'); ?> : </b></td>
					<td class="a-center"><?php echo (int)$stock->getqty(); ;?></td>
					<td class="a-center" rowspan="3" valign="middle"><br><img src="<?php echo $this->getSkinUrl('images/purchase/edit.jpg'); ?>" onclick="document.location.href='<?php echo $this->getUrl('Scanner/Inventory/EditStock', array('stock_id' => $stock->getId())); ?>';"></td>
				</tr>
				<tr>
					<td><b><?php echo $this->__('Available'); ?> : </b></td>
					<td class="a-center"><?php echo (int)$stock->getAvailableQty() ;?></td>
				</tr>
				<tr>
					<td><b><?php echo $this->__('Location'); ?> : </b></td>
					<td class="a-center"><?php echo $stock->getshelf_location() ;?></td>
				</tr>
			</table>
		</td>
	</tr>
<?php endforeach; ?>
<tr>
	<td colspan="2">
		<table border="1" cellspacing="0" cellpadding="5" width="100%">
			<tr>
				<th class="a-center" bgcolor="#cccccc" colspan="5"><?php echo $this->__('Barcodes'); ?></th>
			</tr>
			<?php foreach ($this->getBarcodes() as $barcode): ?>			
				<tr>
					<td class="a-center"><?php echo $barcode->getppb_barcode(); ?></td>
				</tr>
			<?php endforeach; ?>
		</table>
	</td>
</tr>
</table>

<script>
	enableCatchKeys('linkBarcode(<?php echo $this->getProduct()->getId(); ?>);');
</script>